﻿package  loader
{
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.Timer;
public class ImageLoader extends Sprite
{
	public var loade:Loader = new Loader();
   public function ImageLoader():void
   {
   		
     	
		
   }
	public function set path(skinURL:String):void
	{
		
   	 
		loade.contentLoaderInfo.addEventListener(Event.COMPLETE,loadedHandle);
  	  	loade.load(new URLRequest(skinURL));
	}
	public function get mc()
	{
		return loade;
	}
	public function loadedHandle(e:Event):void
	{
		addChild(loade)
		loade.contentLoaderInfo.removeEventListener(Event.COMPLETE,loadedHandle);
		this.dispatchEvent(new Event(Event.COMPLETE));
	}

  
}
}